import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopSpuStatusController } from '../../../controllers';
const uctoominishopSpuStatusRouter = new Router();
const minishopSpuStatusController = new uctooMinishopSpuStatusController();

uctoominishopSpuStatusRouter.post('/add', requireUser, minishopSpuStatusController.add);
uctoominishopSpuStatusRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_spu_status'), minishopSpuStatusController.edit);
uctoominishopSpuStatusRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_spu_status'), minishopSpuStatusController.delete);

//For getting minishopSpuStatus with permission control
uctoominishopSpuStatusRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_spu_status'), minishopSpuStatusController.getSingle);
uctoominishopSpuStatusRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_spu_status'), minishopSpuStatusController.getMany);
uctoominishopSpuStatusRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_spu_status'), minishopSpuStatusController.getMany);

//#endregion AutoCreateCode
export default uctoominishopSpuStatusRouter;
